<template>
  <div class="pagination">
    <el-pagination
      v-model:current-page="pagination.currentPage"
      v-model:page-size="pagination.pageSize"
      :page-sizes="pagination.pageSizes"
      layout="total,sizes, prev, pager, next, jumper"
      :total="tableData.total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script setup>
import { reactive, ref, defineProps } from "vue";
// const emits = defineEmits(["table"]);

const props = defineProps({
  tableData: {
    type: Object,
    default: () => {},
  },
  pagination: {
    type: Object,
    default: () => {},
  },
});

const handleCurrentChange = (value) => {
  props.pagination.currentPage = value;
  //   getData();
};

const handleSizeChange = (value) => {
  props.pagination.pageSize = value;
  //   getData();
};
</script>


<style lang="less" scoped>
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
</style>